home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / mudlib / sys / debug_info.h < prev    next >
C/C++ Source or Header  |  2001-07-14  |  5KB  |  176 lines

  1. #ifndef LPC_DEBUG_INFO_H_
  2. #define LPC_DEBUG_INFO_H_ 1
  3.  
  4. /* Request values for efun debug_info().
  5.  */
  6.  
  7. #define DINFO_OBJECT  0  /* Print information about an object */
  8. #define DINFO_MEMORY  1  /* Print memory usage of an object */
  9. #define DINFO_OBJLIST 2  /* Return an object from the global list */
  10. #define DINFO_MALLOC  3  /* Print the information from the 'malloc' cmd */
  11. #define DINFO_STATUS  4  /* Return the 'status' information */
  12. #define DINFO_DUMP    5  /* Dump some special information into files */
  13. #define DINFO_DATA    6  /* Return internal information */
  14. #define DINFO_TRACE   7  /* Return the current call trace */
  15.  
  16. /* Sub-request values for debug_info(DINFO_DATA) */
  17.  
  18. #define DID_STATUS  0  /* Return the 'status' and 'status tables' information */
  19. #define DID_SWAP    1  /* Return the 'status swap' information */
  20. #define DID_MEMORY  2  /* Return the 'status malloc' information */
  21.  
  22. /* Sub-request values for debug_info(DINFO_TRACE) */
  23.  
  24. #define DIT_CURRENT      0  /* Return the current call chain as an array */
  25. #define DIT_ERROR        1  /* Return the last error call chain as an array */
  26. #define DIT_STR_CURRENT  2  /* Return the current call chain as a string */
  27.  
  28. /* Indices into the array resulting from debug_info(DINFO_DATA, DID_STATUS)
  29.  */
  30.  
  31. #define DID_ST_ACTIONS             0
  32. #define DID_ST_ACTIONS_SIZE        1
  33. #define DID_ST_SHADOWS             2
  34. #define DID_ST_SHADOWS_SIZE        3
  35.  
  36. #define DID_ST_OBJECTS             4
  37. #define DID_ST_OBJECTS_SIZE        5
  38. #define DID_ST_OBJECTS_SWAPPED     6
  39. #define DID_ST_OBJECTS_SWAP_SIZE   7
  40. #define DID_ST_OBJECTS_LIST        8
  41. #define DID_ST_OBJECTS_PROCESSED   9
  42. #define DID_ST_OBJECTS_AVG_PROC   10
  43.  
  44. #define DID_ST_OTABLE             11
  45. #define DID_ST_OTABLE_SLOTS       12
  46. #define DID_ST_OTABLE_SIZE        13
  47.  
  48. #define DID_ST_HBEAT_OBJS         14
  49. #define DID_ST_HBEAT_CALLS        15
  50. #define DID_ST_HBEAT_CALLS_TOTAL  16
  51. #define DID_ST_HBEAT_SLOTS        17
  52. #define DID_ST_HBEAT_SIZE         18
  53. #define DID_ST_HBEAT_PROCESSED    19
  54. #define DID_ST_HBEAT_AVG_PROC     20
  55.  
  56. #define DID_ST_CALLOUTS           21
  57. #define DID_ST_CALLOUT_SLOTS      22
  58. #define DID_ST_CALLOUT_SIZE       23
  59.  
  60. #define DID_ST_ARRAYS             24
  61. #define DID_ST_ARRAYS_SIZE        25
  62.  
  63. #define DID_ST_MAPPINGS           26
  64. #define DID_ST_MAPPINGS_SIZE      27
  65.  
  66. #define DID_ST_PROGS              28
  67. #define DID_ST_PROGS_SIZE         29
  68.  
  69. #define DID_ST_PROGS_SWAPPED      30
  70. #define DID_ST_PROGS_SWAP_SIZE    31
  71.  
  72. #define DID_ST_USER_RESERVE       32
  73. #define DID_ST_MASTER_RESERVE     33
  74. #define DID_ST_SYSTEM_RESERVE     34
  75.  
  76. #define DID_ST_ADD_MESSAGE        35
  77. #define DID_ST_PACKETS            36
  78. #define DID_ST_PACKET_SIZE        37
  79.  
  80. #define DID_ST_APPLY              38
  81. #define DID_ST_APPLY_HITS         39
  82.  
  83. #define DID_ST_STRINGS            40
  84. #define DID_ST_STRING_SIZE        41
  85. #define DID_ST_STR_TABLE_SIZE     42
  86. #define DID_ST_STR_REQ            43
  87. #define DID_ST_STR_REQ_SIZE       44
  88. #define DID_ST_STR_SEARCHES       45
  89. #define DID_ST_STR_SEARCH_LEN     46
  90.  
  91. #define DID_ST_RX_CACHED          47
  92. #define DID_ST_RX_TABLE           48
  93. #define DID_ST_RX_TABLE_SIZE      49
  94. #define DID_ST_RX_REQUESTS        50
  95. #define DID_ST_RX_REQ_FOUND       51
  96. #define DID_ST_RX_REQ_COLL        52
  97.  
  98. #define DID_STATUS_MAX            53 /* Total number of entries */
  99.  
  100.  
  101. /* Indices into the array resulting from debug_info(DINFO_DATA, DID_SWAP)
  102.  */
  103.  
  104. #define DID_SW_PROGS            0
  105. #define DID_SW_PROG_SIZE        1
  106. #define DID_SW_PROG_UNSWAPPED   2
  107. #define DID_SW_PROG_U_SIZE      3
  108. #define DID_SW_VARS             4
  109. #define DID_SW_VAR_SIZE         5
  110. #define DID_SW_FREE             6
  111. #define DID_SW_FREE_SIZE        7
  112. #define DID_SW_FILE_SIZE        8
  113. #define DID_SW_REUSED           9
  114. #define DID_SW_SEARCHES        10
  115. #define DID_SW_SEARCH_LEN      11
  116. #define DID_SW_F_SEARCHES      12
  117. #define DID_SW_F_SEARCH_LEN    13
  118. #define DID_SW_COMPACT         14
  119. #define DID_SW_RECYCLE_FREE    15
  120.  
  121. #define DID_SWAP_MAX           16
  122.     
  123.  
  124. /* Indices into the array resulting from debug_info(DINFO_DATA, DID_MEMORY)
  125.  */
  126.  
  127. #define DID_MEM_NAME            0
  128. #define DID_MEM_SBRK            1
  129. #define DID_MEM_SBKR_SIZE       2
  130. #define DID_MEM_LARGE           3
  131. #define DID_MEM_LARGE_SIZE      4
  132. #define DID_MEM_LFREE           5
  133. #define DID_MEM_LFREE_SIZE      6
  134. #define DID_MEM_LWASTED         7
  135. #define DID_MEM_LWASTED_SIZE    8
  136. #define DID_MEM_CHUNK           9
  137. #define DID_MEM_CHUNK_SIZE     10
  138. #define DID_MEM_SMALL          11
  139. #define DID_MEM_SMALL_SIZE     12
  140. #define DID_MEM_SFREE          13
  141. #define DID_MEM_SFREE_SIZE     14
  142. #define DID_MEM_SWASTED        15
  143. #define DID_MEM_SWASTED_SIZE   16
  144. #define DID_MEM_UNUSED         17
  145. #define DID_MEM_MINC_CALLS     18
  146. #define DID_MEM_MINC_SUCCESS   19 
  147. #define DID_MEM_MINC_SIZE      20
  148. #define DID_MEM_PERM           21
  149. #define DID_MEM_PERM_SIZE      22
  150. #define DID_MEM_CLIB           23
  151. #define DID_MEM_CLIB_SIZE      24
  152.  
  153. #define DID_MEMORY_MAX         25
  154.  
  155.  
  156. /* Indices into the subarrays resulting from debug_info(DINFO_TRACE, 0)
  157.  */
  158.  
  159. #define TRACE_TYPE    0
  160. #define TRACE_NAME    1
  161. #define TRACE_PROGRAM 2
  162. #define TRACE_OBJECT  3
  163. #define TRACE_LOC     4
  164.  
  165. #define TRACE_MAX     5
  166.  
  167. /* Values for entry TRACE_TYPE */
  168.  
  169. #define TRACE_TYPE_SYMBOL  0
  170. #define TRACE_TYPE_SEFUN   1
  171. #define TRACE_TYPE_EFUN    2
  172. #define TRACE_TYPE_LAMBDA  3
  173. #define TRACE_TYPE_LFUN    4
  174.  
  175. #endif /* LPC_DEBUG_INFO_H_ */
  176.